#
# Makefile for LOMBOTECH i2c host controller drivers
#

obj-y += i2c.o

ifeq ($(CONFIG_ARCH_LOMBO_N7V1), y)
I2C_CSP_PLATFORM := n7v1
else ifeq ($(CONFIG_ARCH_LOMBO_N7V3), y)
I2C_CSP_PLATFORM := n9v1
obj-y += cqi.o
else ifeq ($(CONFIG_ARCH_LOMBO_N7V5), y)
I2C_CSP_PLATFORM := n7v5
obj-y += cqi.o
else ifeq ($(CONFIG_ARCH_LOMBO_N5V1), y)
I2C_CSP_PLATFORM := n5v1
obj-y += cqi.o
else ifeq ($(CONFIG_ARCH_LOMBO_N9V1), y)
I2C_CSP_PLATFORM := n9v1
else ifeq ($(CONFIG_ARCH_LOMBO_N9V3), y)
I2C_CSP_PLATFORM := n9v3
obj-y += cqi.o
endif

SOURCE := $(srctree)/$(src)/csp/$(I2C_CSP_PLATFORM)/i2c_csp.c

ifneq ($(wildcard $(SOURCE)), )
obj-y += csp/$(I2C_CSP_PLATFORM)/
else
obj-y += liblombo_i2c.o
$(obj)/liblombo_i2c.o: $(src)/csp/$(I2C_CSP_PLATFORM)/liblombo_i2c
	cp $< $@
endif
